Oxyd, TOGoS, Klonan

Oxyd, TOGoS, Klonan



18 Oct

New pathfinding algorithm Oxyd

Last week we mentioned the change to make biters not collide with each other, but that wasn’t the only biter-related update we released this past week. Somewhat coincidentally, this week’s updates have included something I’d been working on for a few weeks before – an upgrade to the enemy pathfinding system.

Pathfinding

When a unit wants to go somewhere, it first needs to figure out how to get there. That could be as simple as going straight to its goal, but there can be obstacles – such as cliffs, trees, spawners, player entities – in the way. To do that, it will tell the pathfinder its current position and the goal position, and the pathfinder will – possibly after many ticks – reply with a path, which is simply a series of waypoints for the unit to follow in order to get to its destination.

To do its job, the pathfinder uses an algorithm called A* (pronounced 'A star'). A simple example of A* pa...

Read more